#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    srand(time(0));
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_yes_clicked()
{
    this->ui->label->setText("好的，下不为例！");
}

void Widget::on_pushButton_no_pressed()
{
    int width=this->geometry().width();
    int height=this->geometry().height();
    int x=rand()%width;
    int y=rand()%height;
    this->ui->pushButton_no->move(x,y);

}
